<?php
$id = $epg['id'];
$data = file_get_contents('https://m.4gtv.tv/channel/'.$id);
preg_match('/id": "(.*?)"/',$data,$data);
$data = file_get_contents($data[1]);
preg_match_all('/<ul(.*?)<\/ul>/',$data,$data);
$data = $data[0][0].$data[0][1];
preg_match_all('/<div class=\'Time-message\' endtime=\'(.*?)\'>(.*?)</',$data,$time);
//$time[2][]
preg_match_all('/<h3>(.*?)</',$data,$name);
//$name[1][]
for($i = 0; $i <= count($time[2]) - 1; $i++) {
    echo '<li><span>'.$time[2][$i].'&nbsp&nbsp&nbsp&nbsp'.$name[1][$i].'</span></li>';
};